
import reactLogo from "@/assets/react.svg";
import FarmLogo from "@/assets/logo.png";
import { useNavigate } from 'react-router-dom';
import "./index.less"
const Login = () => {
  const { t } = useTranslation();
    const navigate = useNavigate();
    
    const submitLogin = () => {
        navigate('/home', { replace: true })
    }
    return (
        <>
      <div>
      <button type="button" onClick={submitLogin}>跳转首页 </button>
        <a href="https://farmfe.org/" target="_blank">
          <img src={FarmLogo} className="logo" alt="Farm logo" />
        </a>
        <a href="https://react.dev" target="_blank">
          <img src={reactLogo} className="logo react" alt="React logo" />
        </a>
      </div>
      {t("common.no_data")}
      
      <h1>Farm + React</h1>
      <div className="card">
        <p>
          Edit <code>src/main.tsx</code> and save to test HMR
        </p>
      </div>
      <p className="read-the-docs">
        Click on the Farm and React logos to learn more
      </p>
    </>
    );
};

export default Login;
